home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / mus / play / tracker_4_31.lzh / tracker / Amiga / Docs / amiga.tech < prev    next >
Text File  |  1994-06-21  |  4KB  |  68 lines

  1. This soundtracker player has some very interesting features, probably unique.
  2. - it's written entirely in C.
  3. - it's portable.
  4. - it goes through the OS for everything (except the audio filter toggling,
  5. but that's not provided for right now).
  6. - you can steal audio from under it without any trouble !
  7. - it reads archive files (like lha or zoo).
  8. - it buffers its sound output, so that it runs at about the same pace on
  9. every machine WITHOUT NEEDING ANY KLUDGE.
  10.  
  11. The old version used the timer WAIT_EBLANK unit for all its timings and
  12. assumed everything was done fast enough that the new audio commands would 
  13. fall on the right beat. 
  14.  
  15. This new version uses a two tasks model: task 1 fills messages telling
  16. what to do at a given time until it has no messages left and sends them
  17. to task 2. Task 2 peeks at the messages it received, wait for the right
  18. time to act on them, perform the sound changes, and send the message back
  19. to task 1.
  20.  
  21. This offers lots of advantages.
  22. - every time-critical code is bundled in one simple routine that
  23. basically only has to wait for the right time and send very simple events
  24. to the audio device. I've upped the priority of this task to 90 since it
  25. waits most of the time.
  26. - tracker modules do not always need the same amount of processing power,
  27. the load might even vary (and does vary) during one given module. Using
  28. buffering means you equalize the load and you can then play very complex
  29. modules on a small amiga even with unoptimized code.
  30. For instance, verbose output with -show works on almost any amiga and any
  31. module unless you REALLY need too much processing power for it to work.
  32. - because of the buffer, we DO know about the samples we'll have to play
  33. with some look-ahead. It should be feasible to load them from normal ram
  34. to chip without much trouble...
  35.  
  36. and some drawbacks too:
  37. - even though sas/c tries and help you, it's still difficult to debug 
  38. multithreaded programs. I've circumvented that difficulty by adding conditional
  39. code that split tracker into two distinct programs.
  40. - handshaking is easy to get wrong. Forgetting to take some messages into account
  41. can lead you to lose some, and end up with a deadlock when no message is left.
  42. - since audio output is buffered, the interface tends to react with some delay
  43. unless you program things carefully. I haven't even bothered implementing pause...
  44. Part of the problem is alleviated by using ReadEClock() to get some feedback
  45. in the necessary buffer.
  46.  
  47. Another stupid problem I got in while programming the amiga support was using
  48. the standard WAIT unit of the timer.device, the one based on VBLANK.
  49. This was very stupid: using a timer unit of the same resolution (or about so)
  50. as the events I was wanting to measure. Since I got unlucky, it appeared to
  51. work correctly for quite some time... I'm usually looking at a rock-solid
  52. NTSC 60Hz display. 
  53.  
  54.  
  55. Some new add-ons: the event handling is completely decentralized. See events.c.
  56. This is an interesting way to bridge the gap between the usual programming model
  57. and the event-driven model.
  58.  
  59. There is some problem with arq not recognizing requesters built through BuildEasyRequest()
  60. instead of directly EasyRequestArgs()'d, but it enables us to add a filerequester 
  61. (the reqtools one since amigados asl's doesn't support truly asynchronous operation...
  62. Major oversight from commodore).
  63.  
  64. I haven't put any iconifying possibility in the main window. I feel that Menufy/Iconify
  65. provide very nicely for it... and they work for me, so why should I care. 
  66. Already tracker weighs in at 50Ko, that's a true monster of a player program !
  67.  
  68.